<%-- 
    Document   : medicine_details.jsp
    Created on : 26-ene-2009, 11:45:43
    Author     : germinus
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<sql:query var="medicine_details" dataSource="jdbc/cardeacontrol">
    SELECT m.tagId ,mt.mName ,lo.lName ,m.expDate ,m.tagDate, mt.manufacturer,me.message
    FROM medicine_events as me, medicines as m, medicine_events_type
    as met, localization as lo, medicine_types mt
    WHERE me.medicineId = m.id
    AND me.typeEventId=met.id
    AND m.typeId=mt.id
    AND m.localizationId=lo.id
    AND m.id =  ? <sql:param value="${param.med_id}"/>
    <%-- LIMIT ${(param.page-1)*3},${param.page*3} --%>
</sql:query>
<table border="0">
    <tbody>
        <c:forEach var="medicine_detail" items="${medicine_details.rows}">
            <tr>
                <td><strong>C&oacute;digo:</strong></td>
                <td>${medicine_detail.tagId}</td>
            </tr>
            <tr>
                <td><strong>Medicamento:</strong></td>
                <td>${medicine_detail.mName}</td>
            </tr>
            <tr>
                <td><strong>Laboratorio:</strong></td>
                <td>${medicine_detail.manufacturer}</td>
            </tr>
            <tr>
                <td><strong>Localizaci&oacute;n:</strong></td>
                <td>${medicine_detail.lName}</td>
            </tr>
            <tr>
                <td><strong>Fecha de caducidad:</strong></td>
                <td>${medicine_detail.expDate}</td>
            </tr>
            <tr>
                <td><strong>Fecha de etiquetado:</strong></td>
                <td>${medicine_detail.tagDate}</td>
            </tr>
            <tr>
                <td><strong>Observaciones:</strong></td>
                <td>${medicine_detail.message}</td>
            </tr>
        </c:forEach>
    </tbody>
</table>